Skip to content

fix(sveltekit): Fix <meta> tag injection #7612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Mar 24, 2023

Just noticed in my test app that apparently the %sveltekit.head% isn't present in the html that's passed to transformPageChunk. Hence our <meta> tag injection logic introduced in #7574 didn't find the anchor point where to inject the tags. This PR fixes the injection, by simply appending it to an open <head> tag. It's not pretty but it should do the trick 🤞 (we can revisit if this breaks folks).

Tested with one of my kit test apps and now, FE and BE transactions are connected:
image

ref #7526

@Lms24 Lms24 requested a review from AbhiPrasad March 24, 2023 15:55
@Lms24 Lms24 self-assigned this Mar 24, 2023
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.57 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 64.2 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.13 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 56.58 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.59 KB (0%)
@sentry/browser - Webpack (minified) 71.66 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.61 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 51.95 KB (+0.14% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.93 KB (-0.01% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.1 KB (-0.01% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.37 KB (-0.01% 🔽)
@sentry/replay - Webpack (gzipped + minified) 38.44 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 62.59 KB (-0.01% 🔽)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 56.1 KB (-0.01% 🔽)

@Lms24 Lms24 merged commit f6ce5c9 into develop Mar 27, 2023
@Lms24 Lms24 deleted the lms/sveltekit-fix-meta-tag-injection branch March 27, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants